

import request from "../utils/request";


export const queryAllDepts = () => request.get("/depts")


export const addDept = (data) => request.post("/depts", data) // 增加保存部门的请求函数

export const getDeptById = (id) => request.get("/depts/" + id) // 编辑回显根据id

export const editDept = (data) => request.put("/depts", data) //修改

export const deleteDept = (id) => request.delete("/depts?id=" + id) //删除